package com.example.demo.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.shell.standard.ShellCommandGroup;
import org.springframework.shell.standard.ShellComponent;
import org.springframework.shell.standard.ShellMethod;
import org.springframework.shell.standard.commands.Quit;

@Slf4j
@ShellComponent
@ShellCommandGroup("system ctl")
public class QuitCommand implements Quit.Command{

    @ShellMethod(value = "Exit the shell.", key = {"quit", "q", "exit"})
    public void quit() {
        System.exit(0);
    }

}